home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 2004 #9 / Amiga Plus CD - 2004 - No. 09.iso / amigaplus / online / aweb_litebeta / install < prev    next >
Text File  |  2004-08-03  |  8KB  |  289 lines

  1. ; $VER: Install_AWeb_APL (15 March 2003)
  2. ; Description: Installer script for AWeb
  3.  
  4. (set cpu (database "cpu"))
  5. (set cpu020 (and (<> cpu "68000") (<> cpu "68010")))
  6. (set v39 (>= (/ (getversion "exec.library" (resident)) 65536) 39))
  7.  
  8. (set awn (getversion "AWeb"))
  9. (set awv (/ awn 65536))
  10. (set awr (- awn (* awv 65536)))
  11.  
  12. ; all strings used in this installer script
  13. (set #need39 "This program requires OS 3.0 or later to function.")
  14. (set #needcpu "This archive was designed for the 68040 processor, please download the correct version for your CPU.")
  15. (set #nohelp "No help available.")
  16. (set #welcome
  17.    (cat "\n\nAWeb APL is a fast, multithreaded WWW browser for AmigaOS and MorphOS.\n\n"
  18.         "AWeb APL runs with a wide variety of TCP-stacks, including Genesis and Miami.\n\n"
  19.       ("\n\nThis installation procedure will install the AWeb-APL browser version %ld.%ld on your system.\n" awv awr)
  20.    )
  21. )
  22. (set #classact
  23.    (cat "IMPORTANT\n\n"
  24.         "This AWeb APL needs the ClassAct GUI package or ReAction to run.\n"
  25.         "The ClassAct package is not included in the APL archive, but is freely available "
  26.         "from Aminet.\n\n"
  27.         "The ReAction package is included as part of the AmigaOS in version 3.5 and above."
  28.    )
  29. )
  30.  
  31. (set #destdir-prompt "Please select the directory where you want AWeb APL installed.\n(If you do not accept the default, a directory 'AWeb' will be created there.)")
  32. (set #destdir-help "A directory for AWeb will be created here. By accepting the default directory, most of the files don't have to be copied.")
  33. (set #installing "Installing ")
  34. (set #languages-prompt "Please select which language catalog(s) you want to install")
  35. (set #memory-prompt "Is your Amiga equipped with more than 2MB of memory?")
  36. (set #memory-help "AWeb runs on a 2MB Amiga, but needs a special setup on such a machine. If you click the 'only 2MB' button, the appropriate settings will be installed.\n\nYou can always change the settings after installation.")
  37. (set #fonts-prompt "Do you want to install the \"times.font\" and \"courier.font\" sizes 30 and 36?")
  38. (set #fonts-help
  39.    (cat "In order to provide AWeb with a consistent set of fonts, four fonts are included "
  40.       "in this archive, times/30, times/36, courier/30 and courier/36.\n\n"
  41.       "Because AWeb uses these fonts by default, page headers might look really awful "
  42.       " if you don't install these fonts. It is highly recommended that you install them."
  43.    )
  44. )
  45. (set #fixfonts-prompt "The FixFonts utility will be run to make the newly added fonts available.")
  46. (set #fixfonts-help
  47.    (cat "The FixFonts utility is needed to make the newly added fonts available to the system.\n\n"
  48.       "If you intend to use the fonts from this archive, you are strongly encouraged to "
  49.       "run FixFonts now.\n\n"
  50.       "Note that running this program may take a while."
  51.    )
  52. )
  53.  
  54. (set #readme "Displaying the version notes readme...")
  55. (set #makeasgn "Making AWeb_APL assignment to S:User-Startup")
  56. (set #bye
  57.    (cat "In case you need help configuring or using AWeb APL, pressing the HELP key "
  58.         "when AWeb is active will bring up the documentation.\n\n\n"
  59.         "Please check the AwebPlugin  drawer included in this archive for setting up internal image decoders."
  60.    )
  61. )
  62.  
  63. ; ---------------------------------------------------------------------------
  64.  
  65. (complete 0)
  66.  
  67. (if (not v39)
  68.    (abort #need39)
  69. )
  70. (if (not (>= cpu "68040"))
  71.     (abort #needcpu)
  72. )
  73.  
  74. (message #welcome)
  75.  
  76. (run "run >NIL: SYS:Utilities/MultiView Docs/AWeb.iff" (prompt #welcome))
  77.  
  78. (set @source-dir (pathonly @icon))
  79.  
  80. (set defdir
  81.    (askdir
  82.       (prompt #destdir-prompt)
  83.       (help #destdir-help)
  84.       (default @source-dir)
  85.    )
  86. )
  87. (set @default-dest defdir)
  88.  
  89. (set nocopy (= @source-dir @default-dest))
  90.  
  91. (message #classact)
  92.  
  93. (if (not nocopy)
  94.     (
  95.     (set @default-dest (tackon @default-dest "AWeb_APL"))
  96.  
  97.        (set update-aweb (exists @default-dest))
  98.  
  99.     (if (not update-aweb)
  100.         (makedir @default-dest
  101.             (prompt #creating-dir @default-dest)
  102.                (infos)
  103.         )
  104.        )
  105.       (complete 10)
  106.  
  107.       (copyfiles
  108.          (source "")
  109.          (dest @default-dest)
  110.          (choices "AWeb" "AWebCfg" "AWebJS")
  111.          (prompt #installing "AWeb")
  112.          (infos)
  113.       )
  114.       (complete 20)
  115.     (copyfiles
  116.          (source "")
  117.           (dest @default-dest)
  118.          (choices "AwebPlugin")
  119.           (prompt #installing "AWeb")
  120.     )
  121.     (complete 25)
  122.     (copyfiles
  123.          (source "")
  124.           (dest @default-dest)
  125.          (choices "aweblib")
  126.           (prompt #installing "AWeb")
  127.     )
  128.       (complete 30)
  129.  
  130.       (set cache-dir (tackon @default-dest "Cache"))
  131.       (if (not (exists cache-dir))
  132.          (
  133.             (makedir cache-dir
  134.                (prompt #creating-dir cache-dir)
  135.                (infos)
  136.             )
  137.          )
  138.       )
  139.       (complete 40)
  140.  
  141.     (copyfiles
  142.          (source "")
  143.           (dest @default-dest)
  144.          (choices "apl.txt" "ReadMe" "Images")
  145.           (prompt #installing "AWeb")
  146.           (infos)
  147.     )
  148.       (complete 50)
  149.  
  150.       (set languages
  151.          (askoptions
  152.             (choices "English" "ÃeÓtina (Czech)" "Dansk" "Deutsch" "Español"
  153.                "Français" "Greek" "Íslenska" "Italiano" "Nederlands" "Norsk"
  154.                "Polski" "Português" "Russian" "Srpski" "Suomi" "Svenska" "Türkçe")
  155.             (prompt #languages-prompt)
  156.             (help @askoptions-help)
  157.             (default 1)
  158.          )
  159.       )
  160.  
  161.       ; If any language calalogs are selected, copy them.
  162.  
  163.       (if (bitand languages 65534)
  164.          (
  165.             (set catdir (tackon @default-dest "Catalogs"))
  166.             (if (not (exists catdir))
  167.                (makedir catdir
  168.                   (prompt #creating-dir catdir)
  169.                     (infos)
  170.                )
  171.             )
  172.             (set bit 2)    ; English implementation, so there is no catalog for it
  173.             (set langnr 1)
  174.             (while (< langnr 18)
  175.                (if (bitand languages bit)
  176.                   (
  177.                      (set lang
  178.                         ; English is never selected from this list
  179.                         (select langnr "English" "ÃeÓtina" "Dansk" "Deutsch" "Español"
  180.                            "Français" "Greek" "Íslenska" "Italiano" "Nederlands" "Norsk"
  181.                            "Polski" "Português" "Russian" "Srpski" "Suomi" "Svenska" "Türkçe"
  182.                         )
  183.                      )
  184.                      (copyfiles
  185.                         (source (tackon "Catalogs" lang))
  186.                         (choices "aweb.catalog" "awebcfg.catalog")
  187.                         (dest (tackon catdir lang))
  188.                      )
  189.                   )
  190.                )
  191.                (set bit (shiftleft bit 1))
  192.                (set langnr (+ langnr 1))
  193.             )
  194.          )
  195.       )
  196.     )
  197. )
  198.  
  199. (complete 60)
  200.  
  201. ; Only ask if fonts should be installed in expert mode
  202. (if
  203.    (< @user-level 2)
  204.    (set #fonts 1)
  205.    (set #fonts
  206.       (askbool
  207.          (prompt #fonts-prompt)
  208.          (help #fonts-help)
  209.          (choices "Yes" "No")
  210.          (default 1)
  211.       )
  212.    )
  213. )
  214. (if
  215.    (> #fonts 0)
  216.    (
  217.       (copyfiles
  218.          (source "Fonts")
  219.          (dest "Fonts:")
  220.          (choices "times" "courier")
  221.          (prompt #installing "fonts")
  222.       )
  223.       (run "SYS:System/FixFonts"
  224.          (confirm)
  225.          (prompt #fixfonts-prompt)
  226.          (help #fixfonts-help)
  227.       )
  228.    )
  229. )
  230.  
  231. (complete 80)
  232.  
  233. (set #memory
  234.    (askbool
  235.       (prompt #memory-prompt)
  236.       (help #memory-help)
  237.       (choices "More than 2MB" "Only 2MB")
  238.       (default 1)
  239.   )
  240. )
  241. (set #ss_command
  242.    (cat
  243.           "Assign AWEB_APL: "
  244.           '"'
  245.           @default-dest
  246.           '"'
  247.    )
  248. )
  249.  
  250. (startup "AWEB_APL"
  251.  
  252.     (prompt #makeasgn)
  253.  
  254.     (help @startup-help)
  255.  
  256.     (command
  257.  
  258.         (#ss_command)
  259.     )
  260. )
  261.  
  262. (run "run >NIL: " | #ss_command)
  263.  
  264. (if (= #memory 0)
  265.    (
  266.       (makedir
  267.          (tackon @default-dest "T")
  268.       )
  269.       (makedir "ENVARC:AWeb_APL")
  270.       (copyfiles
  271.          (source "2MBsettings")
  272.          (dest "ENVARC:AWeb_APL")
  273.          (all)
  274.       )
  275.       (copyfiles
  276.          (source "ENVARC:AWeb_APL")
  277.          (dest "ENV:AWeb_APL")
  278.          (all)
  279.       )
  280.    )
  281. )
  282.  
  283. (complete 100)
  284.  
  285. (run "SYS:Utilities/MultiView apl.txt" (prompt #readme))
  286. (run "SYS:Utilities/MultiView ReadMe" (prompt #readme))
  287.  
  288. (exit #bye)
  289.